*Cloud plot for fields*

clear

use "Data\kmeans ambition types extended.dta"

**Keep only those for who we observe ambition type**
keep if wage_growth_ambition!=.

*Keep only couples where we observe both partners
gen temp2=koen
destring temp2, replace
by couple_id aar, sort: egen temp3=mean(temp2)
keep if temp3==1.5
drop temp2 temp3

sort pnr aar


keep if aar==2018
drop if final_educ==. | final_educ==1
sort final_educ


by final_educ: egen level_mean_s=mean(wage_start_mean_ambition_s)
by final_educ: egen growth_mean_s=mean(wage_growth_ambition_s)
by final_educ: egen educ_count=count(final_educ)



collapse (first) level_mean_s growth_mean_s educ_count ambition_type_k_3_s ambition_type_k_4_s ambition_type_k_5_s final_inst final_prog, by(final_educ)


*example plots

*help categorize
gsort -final_inst -educ_count

tab final_prog final_inst if final_educ > 10000 & educ_count > 1000



gen educ_code = string(final_educ)
gen program_name=""

replace program_name="Econ, Track A, KU" if educ_code=="27045" /*Economics, cand.polit KU*/
replace program_name="Econ, Track B, KU" if educ_code=="27065" /*Economics, KU*/
replace program_name="Econ, AU" if educ_code=="37065" /*Economics, AU*/

replace program_name="Law, KU" if educ_code=="27085" /*Economics, KU*/
replace program_name="Law, AU" if educ_code=="37085" /*Economics, AU*/

replace program_name="Psych, KU" if educ_code=="27155" /*Economics, KU*/
replace program_name="Psych, AU" if educ_code=="37155" /*Economics, AU*/

replace program_name="Med, KU" if educ_code=="27170" /*Economics, KU*/
replace program_name="Med, AU" if educ_code=="37170" /*Economics, AU*/
replace program_name="Med, SDU" if educ_code=="47170" /*Economics, SDU*/

replace program_name="Business, BSS" if educ_code=="35703" /*Business*/
replace program_name="Business, CBS" if educ_code=="75703" /*Business*/
replace program_name="Business, AAL" if educ_code=="15703" /*Business*/
replace program_name="Business, SDU" if educ_code=="45703" /*Business*/

replace program_name="Political Science, KU" if educ_code=="27101" /*Business*/
replace program_name="Political Science, AU" if educ_code=="37101" /*Business*/


tab final_prog final_inst if final_educ > 70000 

replace program_name="Business Grad, BSS" if educ_code=="35703" /*Business*/
replace program_name="Business Grad, CBS" if educ_code=="75703" /*Business*/
replace program_name="Business Grad, AAL" if educ_code=="15703" /*Business*/
replace program_name="Business Grad, SDU" if educ_code=="45703" /*Business*/

replace program_name="Business Bach, BSS" if educ_code=="35700" /*Business*/
replace program_name="Business Bach, CBS" if educ_code=="75700" /*Business*/
replace program_name="Business Bach, SDU" if educ_code=="45700" /*Business*/

replace program_name="Int Business, BSS" if educ_code=="35713" /*Business*/
replace program_name="Int Business, CBS" if educ_code=="75713" /*Business*/
replace program_name="MBA, CBS" if educ_code=="78848" /*Business*/



tab educ_code ambition_type_k_4_s if program_name !=""

*Fig B8

twoway scatter growth_mean_s level_mean_s if inlist(educ_code, "27065"), msymbol(diamond_hollow) mcolor(dkorange) ///
mlab(program_name) mlabc(black) mlabposition(3) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "37065"), msymbol(diamond_hollow) mcolor(dkorange) ///
mlab(program_name) mlabc(black) mlabposition(11) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"27045"), msymbol(diamond_hollow) mcolor(dkorange) ///
mlab(program_name) mlabc(black) mlabposition(2) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "27085"), msymbol(circle_hollow) mcolor(teal) ///
mlab(program_name) mlabc(black) mlabposition(5) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "37085"), msymbol(circle_hollow) mcolor(teal) ///
mlab(program_name) mlabc(black) mlabposition(9) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "27155"), msymbol(smtriangle_hollow) mcolor(lavender) ///
mlab(program_name) mlabc(black) mlabposition(1) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"37155"), msymbol(smtriangle_hollow) mcolor(lavender) ///
mlab(program_name) mlabc(black) mlabposition(7) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"27170"), msymbol(smdiamond_hollow) mcolor(navy) ///
mlab(program_name) mlabc(black) mlabposition(9) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"37170"), msymbol(smdiamond_hollow) mcolor(navy) ///
mlab(program_name) mlabc(black) mlabposition(5) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "47170"), msymbol(smdiamond_hollow) mcolor(navy) ///
mlab(program_name) mlabc(black) mlabposition(11) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"35703"), msymbol(smsquare_hollow) mcolor(maroon) ///
mlab(program_name) mlabc(black) mlabposition(11) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"75703"), msymbol(smsquare_hollow) mcolor(maroon) ///
mlab(program_name) mlabc(black) mlabposition(3) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"15703"), msymbol(smsquare_hollow) mcolor(maroon) ///
mlab(program_name) mlabc(black) mlabposition(9) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"45703"), msymbol(smsquare_hollow) mcolor(maroon) ///
mlab(program_name) mlabc(black) mlabposition(3) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code, "27101"), msymbol(smtriangle_hollow) mcolor(gs12%50) ///
mlab(program_name) mlabc(black) mlabposition(9) || ///
scatter growth_mean_s level_mean_s if inlist(educ_code,"37101"), msymbol(smtriangle_hollow) mcolor(gs12%50) ///
mlab(program_name) mlabc(black) mlabposition(9) ///
xtitle("starting wage (standardized)") ytitle("growth (standardized)") ///
legend(off) graphregion(fcolor(white)) xscale(range(0 4)) xlabel(0(1)4) yscale(range(0 3.5)) ylabel(0(1)3) scheme(s2color)








